function checkModule(name, host, config){
    $.ajax({
        url: "/test/moduleDetail.html",
        data: {name: name, host: host},
        dataType: "json",
        success: function(r){

            //[["search_demo_data","stop"],["search_demo_web","stop"],["search_service","start"]]

            //if(r.length > 0){
            //    $("#appInstalledTrue").css("display","")
            //    $("#appInstalledFalse").css("display","none")
            //}
            var table = [];
            table.push('<table class="table  table-striped table-bordered table-hover " id = "moduleTable">');

            table.push('    <thead>');
            table.push('        <tr>');
            table.push('            <th style="width:5%">序号</th>');
            table.push('            <th style="width:30%">模块名称</th>');
            table.push('            <th>操作</th>');

            table.push('        </tr>');
            table.push('    </thead>');
            table.push('    <tbody>');
            table.push('    </tbody>');
            table.push('</table>');

            var obj = $("#" + config.targetId); //$("#moduleTable tbody")
            obj.empty();
            obj.append(table.join(""));
            obj = obj.find("tbody");

            $.each(r, function(i, n){

                var arr = []
                arr.push("<tr>")
                arr.push("<td>" + (i + 1) +"</td>")
                arr.push("<td>")
                if(n[1] == "start")
                    arr.push("<img src='/image/status_start.png' style='width:16px'/>&nbsp;" + n[0])
                else
                    arr.push("<img src='/image/status_stop.png'  style='width:16px'/>&nbsp;" + n[0])

                arr.push("</td>")

                arr.push("<td>")

                if(n[1] == "start"){

                    arr.push("<a type=button onclick=\"actionAndLog('/test/manager.html?action=stop&name=" + name + "&host=" + host + "&module=" + n[0]+"', 'stop','" +  n[0] +"', 'log_" + (i + 1)+"')\" class='btn' title='停止'><i class='icon-off'></i></a>")
                    arr.push("<a type=button onclick=\"actionAndLog('/test/manager.html?action=stop_9&name=" + name + "&host=" + host + "&module=" + n[0]+"', 'stop_9','" +  n[0] +"', 'log_" + (i + 1)+"')\" class=\"btn btn-danger\" title=\"强制停止\"><i class='icon-off'></i></a>")
                    arr.push("<a type=\"button\" onclick=\"actionAndLog('/test/manager.html?action=restart&name=" + name + "&host=" + host + "&module=" + n[0]+"', 'all','" +  n[0] +"', 'log_" + (i + 1)+"')\" class=\"btn\" title=\"重启\"><i class='icon-repeat'></i></a>")

                    arr.push("<a type=\"button\" onclick=\"actionAndLog('/test/manager.html?action=all&name=" + name + "&host=" + host + "&module=" + n[0]+"', 'all','" +  n[0] +"', 'log_" + (i + 1)+"')\" class=\"btn\" title=\"更新并重启\"><i class='icon-refresh'></i></a>")

                    arr.push("<input style='height: 24px;padding-top:2px;margin-top:0px' type=\"button\" onclick=\"actionAndLog('/test/manager.html?action=pid&name=" + name + "&host=" + host + "&module=" + n[0]+"', 'pid','" +  n[0] +"', 'log_" + (i + 1)+"')\" class=\"btn btn-info\" value=\"PID\">")

                }else{

                    arr.push("<a type=\"button\" onclick=\"actionAndLog('/test/manager.html?action=start&name=" + name + "&host=" + host + "&module=" + n[0]+"', 'start','" +  n[0] +"', 'log_" + (i + 1)+"')\" class=\"btn\" title=\"启动\"><i class='icon-play'></i></a>")
                    arr.push("<a type=\"button\" onclick=\"actionAndLog('/test/manager.html?action=compile&name=" + name + "&host=" + host + "&module=" + n[0]+"', 'compile','" +  n[0] +"', 'log_" + (i + 1)+"')\" class=\"btn\" title=\"编译\"><i class='icon-random'></i></a>")
                    arr.push("<a type=\"button\" onclick=\"actionAndLog('/test/manager.html?action=compile-u&name=" + name + "&host=" + host + "&module=" + n[0]+"', 'compile-u','" +  n[0] +"', 'log_" + (i + 1)+"')\" class=\"btn btn-info\" title=\"编译-U\"><i class='icon-random'></i></a>")

                }

                var log_file = "logs/" + n[0] + ".log";
                if(n.length == 3){
                    log_file =  n[2];
                }
                arr.push("<a id = \"log_" + ( i + 1)+"\" type=\"button\" onclick=\"log('" + name + "','" + host + "', '" + log_file +"', 'area', true, 'log_" + (i + 1)+"')\" class=\"btn\" title=\"查看日志\"><i class='icon-file'></i></a>")


                arr.push("</td>")
                arr.push("</tr>")
                obj.append(arr.join("\n"))


            })


            if(typeof config.complete != "undefined" && config.complete != null)
                config.complete(r);//reSizeHeight()

        }

    })

}